<template>
	<view v-if="pageShow">
		<view class="mainpadding ffffff">
			<!-- 身份:1=主办方,2=俱乐部,3=团队，4场馆，5教练 -->
			<template v-if="type==1 || type==2 || type==4">
				<!-- 场馆财务管理 -->
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/caiwuglcg',1)" v-if="type==4">
					<view class="ershil nofonweight xiaohei margin_top1">财务管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/caiwugl',1)" v-if="type==1 || type==2">
					<view class="ershil nofonweight xiaohei margin_top1">财务管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/bisaigl')">
					<view class="ershil nofonweight xiaohei margin_top1">比赛管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/saishiddgl',1)">
					<view class="ershil nofonweight xiaohei margin_top1">赛事订单管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/chongzhixgl')">
					<view class="ershil nofonweight xiaohei margin_top1">充值项管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/quanyikgl')">
					<view class="ershil nofonweight xiaohei margin_top1">权益卡管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
			</template>
			<template  v-if="type==5">
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/caiwugl')">
					<view class="ershil nofonweight xiaohei margin_top1">财务管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/chongzhixgl')">
					<view class="ershil nofonweight xiaohei margin_top1">充值项管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
			</template>
			<template v-if="type==2 || type==4">
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/huodonggl')">
					<view class="ershil nofonweight xiaohei margin_top1">活动管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/huodongddgl',1)">
					<view class="ershil nofonweight xiaohei margin_top1">活动订单管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
				<view class="flexbetween margin_top xiahuaxian"  v-if="type==2" @click="jumper('/pages_mypage/wodejlb')">
					<view class="ershil nofonweight xiaohei margin_top1">我的俱乐部</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
			</template>
			<template  v-if="type==4 || type==2">
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/huiyuangl',1)">
					<view class="ershil nofonweight xiaohei margin_top1">会员管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
			</template>
			<template v-if="type==4">
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/jiaoliangl')">
					<view class="ershil nofonweight xiaohei margin_top1">教练管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/xiaoshougl')">
					<view class="ershil nofonweight xiaohei margin_top1">销售管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/changdigl')">
					<view class="ershil nofonweight xiaohei margin_top1">场地管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/changdiydgl',1)">
					<view class="ershil nofonweight xiaohei margin_top1">场地预定管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/changdiddgl',1)">
					<view class="ershil nofonweight xiaohei margin_top1">场地订单管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/wodecd')">
					<view class="ershil nofonweight xiaohei margin_top1">我的场馆</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/sanchanggl')">
					<view class="ershil nofonweight xiaohei margin_top1">散场管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
			</template>
			<template v-if="type==3">
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/wodetd')">
					<view class="ershil nofonweight xiaohei margin_top1">队员管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
			</template>
			<template v-if="type==4|| type==5">
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/kechenggl')">
					<view class="ershil nofonweight xiaohei margin_top1">课程管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/kechengddgl',1)">
					<view class="ershil nofonweight xiaohei margin_top1">课程订单管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/kechengqjgl')">
					<view class="ershil nofonweight xiaohei margin_top1">课程请假管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
			</template>
			<template v-if="type==5">
				<view class="flexbetween margin_top xiahuaxian" @click="jumpurl('/pages_mypage/jiaolianbj?type=1&id=',user_zbfapply_listid)">
					<view class="ershil nofonweight xiaohei margin_top1">编辑教练信息</view>
					<u-icon name="arrow-right"></u-icon>
				
				</view>
				<view class="flexbetween margin_top xiahuaxian" @click="jumpkb('/pages_mypage/jiaoliankb?id=',user_zbfapply_listid)">
					<view class="ershil nofonweight xiaohei margin_top1">教练课表</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
			</template>
			<template v-if="type==1|| type==2 || type==5 || type==4">
				<view class="flexbetween margin_top xiahuaxian" @click="jumper('/pages_mypage/youhuiqgl')">
					<view class="ershil nofonweight xiaohei margin_top1">优惠券管理</view>
					<u-icon name="arrow-right"></u-icon>
				</view>
			</template>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				type:1,//身份:1=主办方,2=俱乐部,3=团队，4场馆，5教练
				pageShow:true,
				user_zbfapply_listid:"",
				cancel_status:1,//1正常，2取消合作
			}
		},
		onLoad(options) {
			this.type=options.type
			this.user_zbfapply_listid=options.user_zbfapply_listid
			this.cancel_status=options.cancel_status
		},
		onShow() {
			// this.userinfomsg()
		},
		methods: {
			// userinfomsg() {
			// 	httpRequest.request('/api/user/index', 'GET', {}).then(res => {
			// 		this.type = res.data.userzbfapply.type
			// 		this.dataAll = res.data
			// 		this.pageShow = true
			// 	})
			// },
			jumper(url,val) {
				if(val!=1 && this.cancel_status==2){
					httpRequest.toast("平台已取消合作，无法查看此功能")
					return false
				}
				if(url=="/pages_mypage/kechenggl"){//如果是课程管理需要给当前身份传进去
					uni.navigateTo({
						url: url+"?user_zbfapply_listid="+this.user_zbfapply_listid+"&type="+this.type
					})
					return false
				}
				uni.navigateTo({
					url: url+"?user_zbfapply_listid="+this.user_zbfapply_listid
				})
			},
			jumpurl(url,id) {
				uni.navigateTo({
					url: url+id+"&user_zbfapply_listid="+this.user_zbfapply_listid
				})
			},
			jumpkb(url,id){
				uni.navigateTo({
					url: url+id
				})
			}
		}
	}
</script>

<style>

</style>
